#./modules/statistics/Makefile
SOURCES = $(wildcard *.cpp)
OBJS = $(patsubst %.cpp,%.o,$(notdir $(SOURCES)))
OBJSD = $(addprefix $(TMP_DIR)statistics/,$(OBJS))

INCLUDE = -I $(PWD)/common/util \
          -I $(PWD)/common/utilc \
		  -I $(PWD)/common/ludb

all:chkdir statistics$(TAGTYPE)

chkdir:
	$(shell mkdir -p $(TMP_DIR)statistics/)

statistics_static:$(OBJS)
	$(AR) $(OUT_DIR)statistics.a $(OBJSD)

statistics_shared:$(OBJS)
	$(GG) -shared -fPIC $(OBJSD) -o $(OUT_DIR)statistics.so

$(OBJS):%.o:%.cpp
	$(GG) $(INCLUDE) $(GFLAGS) -c $< -o $(TMP_DIR)statistics/$@

clean:
	rm -rf $(TMP_DIR)statistics/*.o